package com.example.train.app.service.assembler;

import com.example.train.api.dto.DepartmentDTO;
import com.example.train.domain.entity.Department;

/**
 * @Author: ActingK20 42643
 * @Date: 2023/3/24 15:26
 */
public class DepartmentAssembler {
    private DepartmentAssembler(){}
    public static Department toDepartment(DepartmentDTO departmentDTO){
        Department department = new Department();
        department.setDepartmentId(departmentDTO.getDepartmentId());
        department.setDepartmentName(departmentDTO.getDepartmentName());
        department.setLocationId(departmentDTO.getLocationId());
        department.setManagerId(departmentDTO.getManagerId());
        return department;
    }
}
